@extends('layout.admin')
@section('title','后台直播/录播视频列表')
@section('content')
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" >
        <div class="col-md-12" id="content" >
            <div class="app_content_div" id="app_content_div_301Index">
                <h3>直播录播管理</h3>
            </div>
            <div>
        <div style="float:right;">
            <a href="/adm/video-create" class="btn btn-primary" >新增视频</a>
        </div>
    </div>

    <table class="table table-striped">
        <thead>
        <tr>
            <th>id</th>
            <th>标题</th>
            <th>专家</th>
            <th>类型</th>
            <th>开始时间</th>
            <th>结束时间</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        @foreach($oVideos as $v)
            <tr>

                <th scope="row">{{$v->id}}</th>
                <td>{{$v->name}}</td>
                    <?php
                    $master = \App\Models\Master::find($v->master_id);
                    ?>
                <td>
                    {{$master->name}}
                </td>
                @if($v->type==0)
                    <td>录播</td>
                @endif
                @if($v->type==1)
                    <td>直播</td>
                @endif
                <td>{{$v->start_at}}</td>
                <td>{{$v->end_at}}</td>
                <td>
                    <a href="/adm/video-edit/{{$v->id}}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a> &nbsp;&nbsp;&nbsp;
                    <a href="/adm/video-delete/{{$v->id}}"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
            {{$oVideos->links('layout.page')}}
        </div>
    </div>
@endsection
